import NebPay from 'nebpay.js'

function Config(env) {
  var config = {
    dappaddr: '',
    callback: '',
    reqhost: '',
    explorer: ''
  }
  if (env == 'mainnet') {
    // TX Hash	bd43a9af31699649cc6ec724d532462fe356b3e426037020badad589897b8da7
    // Contract address	n1h5ofb9ggqxGtoczSAGMExTP41TNZKPvaW
    config.dappaddr = 'n1h5ofb9ggqxGtoczSAGMExTP41TNZKPvaW';
    config.callback = NebPay.config.mainnetUrl;
    config.reqhost = 'https://mainnet.nebulas.io/'
    config.explorer = 'https://explorer.nebulas.io/#/'
  }
  else if (env == 'testnet') {
    // TX Hash	19bbe6e2c88313afdea516213c6ed9292c8af8075ad29a97ff2847fc117cf422
    // Contract address	n1wTrAfGQidKFtAmGXZj2bJBLRDCwHYhhyh
    config.dappaddr = 'n1wTrAfGQidKFtAmGXZj2bJBLRDCwHYhhyh';
    config.callback = NebPay.config.testnetUrl;
    config.reqhost = 'https://testnet.nebulas.io';
    config.explorer = 'https://explorer.nebulas.io/#/testnet/'
  }
  else {
    config.dappaddr = 'n1sHgxnu1CyHfxnEiFcKCtJNiSRXobfi1PX';
    //config.callback = NebPay.config.mainnetUrl;
    config.reqhost = '';
  }
  return config;
}

export default Config;
